Skip to content

intel: platform: use Kconfig for IDC stack size#11031

Open
serhiy-katsyuba-intel wants to merge 1 commit into
thesofproject:mainfrom
serhiy-katsyuba-intel:stack_def
Open

intel: platform: use Kconfig for IDC stack size#11031
serhiy-katsyuba-intel wants to merge 1 commit into
thesofproject:mainfrom
serhiy-katsyuba-intel:stack_def

Conversation

@serhiy-katsyuba-intel

@serhiy-katsyuba-intel serhiy-katsyuba-intel commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

On Intel platforms, SOF_STACK_SIZE is only used to define the IDC worker thread stack size. However, a Kconfig option, CONFIG_SOF_STACK_SIZE, already exists. On some platforms, the IDC worker thread stack size was hard-coded in memory.h, which appears to have been an oversight.

The default value of CONFIG_SOF_STACK_SIZE is 4096, but it is increased to 8192 for the PTL board and in some overlays, such as the MTL DAX overlay. Therefore, this change also increases the IDC worker thread stack size for those configurations.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aligns Intel platform stack sizing with the existing Kconfig setting by defining SOF_STACK_SIZE in terms of CONFIG_SOF_STACK_SIZE (instead of a hard-coded 0x1000). This makes the IDC worker thread stack size follow board/overlay configuration (e.g., PTL/MTL DAX overlays increasing it to 8192), matching how multiple other platforms already derive SOF_STACK_SIZE.

Changes:

  • Replace hard-coded SOF_STACK_SIZE (4KB) with CONFIG_SOF_STACK_SIZE on Meteorlake, Lunarlake, and ACE30.
  • Ensure IDC worker thread stack sizing tracks Kconfig/overlay adjustments for affected Intel targets.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/platform/meteorlake/include/platform/lib/memory.h Switch SOF_STACK_SIZE to use CONFIG_SOF_STACK_SIZE for MTL.
src/platform/lunarlake/include/platform/lib/memory.h Switch SOF_STACK_SIZE to use CONFIG_SOF_STACK_SIZE for LNL.
src/platform/ace30/include/platform/lib/memory.h Switch SOF_STACK_SIZE to use CONFIG_SOF_STACK_SIZE for ACE30.


/* Stack configuration */
#define SOF_STACK_SIZE 0x1000
#define SOF_STACK_SIZE (CONFIG_SOF_STACK_SIZE)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think parentheses are needed. The Kconfig parameter resolves to just a constant, doesn't it?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also not sure why an increase to 8K is needed? Were 4K not enough in some cases? Maybe it needs a new Kconfig?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think parentheses are needed. The Kconfig parameter resolves to just a constant, doesn't it?

Pushed a new version with removed parentheses.

also not sure why an increase to 8K is needed? Were 4K not enough in some cases? Maybe it needs a new Kconfig?

CONFIG_SOF_STACK_SIZE default value in Kconfig is 4096. But on ACE3 and NVL boards it is redefined to 8192. Probably, somebody already tested there and decided the default 4096 is not enough. SOF_STACK_SIZE was defined as 0x1000 in ace3 memory.h, that define is only used to configure IDC worker tread stack size. So on PTL (and some other platforms with overlays) this change will increase IDC stack size to be the same size as other stacks: LL, IPC, DP.

I think adding many config options for stack sizes is excessive. We can assume the requirements for LL, IPC, DP and IDC stacks are about the same and just use one CONFIG_SOF_STACK_SIZE.

On Intel platforms, SOF_STACK_SIZE is only used to define the IDC worker
thread stack size. However, a Kconfig option, CONFIG_SOF_STACK_SIZE,
already exists. On some platforms, the IDC worker thread stack size was
hard-coded in memory.h, which appears to have been an oversight.

The default value of CONFIG_SOF_STACK_SIZE is 4096, but it is increased
to 8192 for the PTL board and in some overlays, such as the MTL DAX
overlay. Therefore, this change also increases the IDC worker thread
stack size for those configurations.

Signed-off-by: Serhiy Katsyuba <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants